﻿#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<string>
using namespace std;

class Maker {
public:
	Maker() {

	}
	void printMaker() {
		if (this == NULL) return;
		cout << this->a << endl; // this为NULL则有空指针异常 
	}
private:
	int a;
};

void test01() {
	Maker *m = NULL;
	m->printMaker(); // 空指针异常 
}


int main()
{

	test01(); 

	system("pause");
	return EXIT_SUCCESS;
}